<template>
  <!-----------------收货地址------------------>
  <view class="all">
    <hea :title="title" :dizhi="alldizhi"></hea>

    <div class="box1">
      <div
        style="
          line-height: 50px;
          font-size: 20px;
          margin-left: 15px;
          color: grey;
        "
      >
        地址
      </div>
      <div class="block">
        <el-cascader
          style="border: 0px"
          v-model="value"
          :options="options"
          @change="handleChange"
        ></el-cascader>
      </div>
    </div>
    <u--input
      placeholder="请填写详细地址,要精确到门牌号哦"
      border="surround"
      v-model="value1"
      @blur="blur"
      fontSize="16px"
      style="height: 40px; border: 0px; background-color: white"
    ></u--input>
  </view>
</template>
<script>
import hea from "../../components/hea.vue";
import data from "../../components/json.json";
export default {
  components: {
    hea,
  },

  data() {
    return {
      title: "收货地址",
      value1: "",
      value: [],
      options: data,
      dizhi: "",
      alldizhi: "",
    };
  },
  methods: {
    handleChange(value) {
      console.log(value.join(""));
      this.dizhi = value.join("");
    },

    sureJump() {
      uni.navigateTo({
        url: "/pages/center/nickname",
      });
    },
    blur() {
      this.alldizhi = this.dizhi + this.value1;
    },
  },

  onShow() {},
};
</script>

<style scoped>
.all {
  width: 100vw;
  height: 100vh;
  background: #f2f2f2;
}
.box1 {
  width: 100%;
  height: 50px;
  background-color: white;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgb(206, 206, 206);
}
</style>
